fix(cdm): let a tracked bar find its debuff on the target - #1997
Open
dfrisone wants to merge 3 commits into
Open
fix(cdm): let a tracked bar find its debuff on the target#1997dfrisone wants to merge 3 commits into
dfrisone wants to merge 3 commits into
Conversation
Reported for a rogue Blind macro that sets focus to the target, clears the
target, targets and blinds someone else, then restores the original target
from focus, all inside one macro. Afterwards the player's bleeds on that
target stop showing on the tracked bar until they switch target and back.
The stall is Blizzard's. CooldownViewerMixin:OnPlayerTargetChanged only
refreshes when UnitGUID("target") differs from the one it stored, and this
macro ends on the GUID it started with, so the refresh never runs and the
item stays inactive. Its frame-scoped aura cache is keyed on unit token and
stamped with GetTime(), and nothing on the target-change path marks it dirty,
so a second target change inside one frame reads the stale list.
Our display is a faithful mirror of that, so it goes quiet with it. But the
bind-miss fallback that already exists for "the viewer has not bound this aura
yet" only ever asked GetPlayerAuraBySpellID, which cannot see a debuff on
somebody else. It now asks the target too, so the bar rides out the stall.
Only a readable sourceUnit mismatch rejects the aura, so another player's copy
of the same debuff cannot drive the bar while an unreadable one still shows.
Field reads need no new guarding: the consumer already classifies duration,
expirationTime and applications before comparing them.
PLAYER_TARGET_CHANGED joins both tick wake sets as well. Target-applied auras
bind and release on that edge and on no player-scoped one, so a parked ticker
had no way to learn a new target already carried a tracked debuff.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes the tracked-bar fallback for player-applied auras on the target when the Blizzard viewer has not bound an active aura. Reported by guld on 9.1.6 after a macro temporarily clears/switches/restores the target while bleeds are active.
The existing player-aura lookup remains first. The target fallback uses GetAuraDataBySpellName with HARMFUL|PLAYER, or HELPFUL|PLAYER for a friendly target. Ownership is filtered engine-side; no sourceUnit field is inspected. Spell and base-spell names are cached per configuration in a weak-key table and invalidated when their configured IDs change.
PLAYER_TARGET_CHANGED goes through the existing sleeper Probe, extended with the same target lookup for eligible fallback configurations. An empty probe leaves the ticker parked. The cooldown-hooks generation bump on target changes remains unchanged.
How was it tested?
Screenshots
Before/after screenshots are not supplied. In-game validation remains pending.
Checklist
HookScript/hooksecurefunconly, neverSetScripton Blizzard frames - reads only; external weak cache.